package com.sky.mapper;

import com.sky.entity.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentMapper {
    @Insert("INSERT INTO student (name, gender, age, grade, class_name, score_math, score_english, score_chinese,status, create_time) " +
            "VALUES (#{name}, #{gender}, #{age}, #{grade}, #{className}, #{scoreMath}, #{scoreEnglish}, #{scoreChinese}, #{status}, #{createTime})")
    void insertStudent(Student student);
    @Select("select * from student")
    List<Student> selectAll();
}